package com.java.demo001.Collection;

import org.springframework.web.bind.annotation.*;

import javax.sound.midi.SoundbankResource;


@RestController
@RequestMapping("api")
public class UserCollection {

    @PostMapping("login")
    public AAA login(@RequestParam("username") String username,
                     @RequestParam("password") String password){
        AAA a = new AAA();
        if(username.equals("java") && password.equals("123456")){
            a.setStatus(1);
            a.setUsername(username);
            a.setNianling(20);
            a.setMsg("登陆成功");
            return a;
        }else {
            System.out.println(222);
            a.setStatus(0);
            a.setMsg("用户名或者密码错误");
            return a;
        }
    }
}
